<template>
  <div id="app">
      <el-container>
  <el-header>电商管理系统页面</el-header>
  <el-container>
    <el-aside width="200px"><el-row class="tac">
  <el-col :span="24">
    <h5></h5>
    <el-menu
      default-active="this.$route.path"
      class="el-menu-vertical-demo"
      @open="handleOpen"
      @close="handleClose">
     <el-menu-item index="1">
        <i class="el-icon-location"></i>
        <span slot="title" @click="products()">商品模块</span>
      </el-menu-item>
      <el-menu-item index="2">
        <i class="el-icon-menu"></i>
        <span slot="title" @click="users()">用户模块</span>
      </el-menu-item>
      <el-menu-item index="3">
        <i class="el-icon-document"></i>
        <span slot="title" @click="orders()">订单模块</span>
      </el-menu-item>
      <el-menu-item index="4">
        <i class="el-icon-setting"></i>
        <span slot="title" @click="seckills()">秒杀模块</span>
      </el-menu-item>
    </el-menu>
  </el-col>
</el-row>
</el-aside>
    <el-main>
      <router-view>
        
      </router-view>
      </el-main>
  </el-container>
</el-container>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      },
      products()
      {
        this.$router.push("/Product");
      },
      users()
      {
        this.$router.push("/User");
      },
      orders()
      {
        this.$router.push("/Order");
      },
      seckills()
      {
        this.$router.push("/Seckill");
      }

    }
}
</script>

<style>
/* #app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
} */
</style>
